<?php

namespace api\models;

use Yii;

/**
 * This is the model class for table "zhibo_list".
 *
 * @property integer $id
 * @property string $title
 * @property string $cover_image
 * @property integer $uid
 * @property integer $cid
 * @property integer $room_id
 * @property string $name
 * @property string $region
 * @property integer $look_nums
 */
class ZhiboList extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'zhibo_list';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid'], 'required'],
            [['uid', 'cid', 'room_id', 'look_nums'], 'integer'],
            [['title', 'cover_image', 'name'], 'string', 'max' => 255],
            [['region'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', '自增id'),
            'title' => Yii::t('app', '直播标题'),
            'cover_image' => Yii::t('app', '直播间封面'),
            'uid' => Yii::t('app', '关联用户表'),
            'cid' => Yii::t('app', '分类id'),
            'room_id' => Yii::t('app', '房间号'),
            'name' => Yii::t('app', '昵称'),
            'region' => Yii::t('app', '地区'),
            'look_nums' => Yii::t('app', '观看人数'),
        ];
    }
}
